package cn.powertime.evaluation.facade;

import cn.powertime.evaluation.entity.CpsAutomatic;
import cn.powertime.evaluation.entity.CpsExaminationResult;
import cn.powertime.evaluation.vo.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 * 试卷表 服务类
 * </p>
 *
 * @author Yang Xin
 * @since 2019-09-25
 */
public interface CpsTestPaperFacade {

    /**
     * 课后作业/课程刷题试卷列表
     *
     * @param vo 参数vo
     * @return RespTestPaperVo 试卷vo
     */
    Page<RespTestPaperPageVo> courseWorkTestPaperList(ParamPageVo<ReqCourseTestPaperSearchVo> vo);

    /**
     * 课后作业最后一道试卷习题列表
     *
     * @param sectionId 课程小节id
     * @return RespTestPaperVo 试卷vo
     */
    RespTestPaperVo courseWorkTopicList(Long sectionId);

    /**
     * 课程刷题
     *
     * @param courseId 课程id
     * @return RespTestPaperVo 试卷vo
     */
    RespTestPaperVo courseTopicList(Long courseId);

    /**
     * 智能练习
     *
     * @return RespAutomaticVo
     */
    RespAutomaticVo automaticTopicList();

    /**
     * 智能练习保存试卷2
     *
     * @param vo
     */
    void saveAutomaticTestPaper(ReqAutomaticTestPaperVo vo);

    /**
     * 真题模拟试卷列表
     *
     * @param vo 分页参数
     * @return Page
     */
    Page<RespTestPaperPageVo> simulateExaminationPaperList(PageVo vo);

    /**
     * 通过试卷id查询习题列表
     *
     * @param testPaperId 试卷id
     * @return RespTestPaperVo 试卷vo
     */
    RespTestPaperVo testPaperTopicList(Long testPaperId);

    /**
     * 通过试卷类型及归属测评练习ID查询试卷
     *
     * @param vo (type:试卷类型，practiceId:测评练习题库id)
     * @return Page
     */
    Page<RespTestPaperPageVo> testing(ParamPageVo<ReqTestPaperSearchVo> vo);

    /**
     * 保存试卷
     *
     * @param testPaperVo
     */
    void saveTestPaper(ReqTestPaperVo testPaperVo);

    /**
     * 提交试卷
     *
     * @param testPaperVo 试卷vo
     */
    CpsExaminationResult submitTestPaper(ReqTestPaperVo testPaperVo);

    /**
     * 提交智能练习试卷
     *
     * @param vo 智能练习试卷vo
     */
    CpsAutomatic submitAutomaticTestPaper(ReqAutomaticTestPaperVo vo);


    public AppRespTestPaperVo courseWorkTopicListApp(Long sectionId);

    CpsExaminationResult AppsubmitTestPaper(ReqTestPaperVo testPaperVo);

}
